<template>
	<view class="">
		<view class="pd15"  >
			<view class="text-center flex alcenter border text-primary bdr10">
				<view class="flex-1 plt10 w50" :class="{'act':intindex===index}" v-for="(item,index) in items"
					@click="tabclick(index)">{{item.name}}</view>
			</view>
			<view class="plt10 border-bottom cl-w" style="background: #1f1f1f;margin-top: 20rpx;" v-for="(item,index) in list">
				<view class="flex">
					<!-- <image :src="item.thumb" mode="" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
					 --><view class="ml10">
						<view class="ftw600 ft15">{{item.uname}}</view>
						<view class="mt10">{{item.description}}</view>
						<view class="text-placeholder mt5">{{$u.timeFormat(item.createtime, 'yyyy-mm-dd hh:MM:ss')}}</view>
						<view class="mt10" v-if="item.state==1">回复内容：{{item.huifu_desc}}</view>
						<view class="mt10" v-else>待回复</view>
						<view class="text-placeholder mt5"  v-if="item.state==1">{{item.huifu_time}}</view>
					</view>
				</view>						
			</view>
			<button class="baocun"  @click="to_tiaozhuan('add')">提交反馈</button>
		</view>
		<u-empty text="暂无数据" mode="list" v-if="list==''" margin-top="200"></u-empty>
	<!-- 	<view class="fabu" @click="to_tiaozhuan('add')">
			<view class="iconfont icon-bianji ft32 cl-w"></view>
		</view> -->
		
	</view>
</template>
<script>
	export default {
		data() {
			return {
				items: [{
						name: "未处理"
					},
					{
						name: "已处理"
					}
				],
				list: [],
				type: 0,
				intindex: 0
			}
		},
		methods: {
			to_tiaozhuan(url) {
				uni.navigateTo({
					url: url
				})
			},
			tabclick(index) {
				this.intindex = index
				this.init()
			},
			init() {
				uni.showLoading({
					title:'加载中...'
				})
				this.$httpas.post2({
					data: {
						do: 'feedback',
						op: 'index',
						index: this.intindex
					},
					success: res => {
						uni.hideLoading()
						this.list = res
					}
				})
			}
		},
		onShow() {
			// this.init()
		}
	}
</script>
<style>
	
</style>
<style lang="scss" scoped>
	.w50{
			 width: 50%;
	}  
	.border {
		border-width: 0.5px;
		border-style: solid;
		border-color: rgba(26, 140, 239, 1);
	}
	.text-placeholder{
		color: #c3c9cf;
	}
	.text-primary {
		color: rgba(26, 140, 239, 1);
	}

	.act {
		color: #FFFFFF;
		background: rgba(26, 140, 239, 1);
	}

	.fabu {
		position: fixed;
		right: 30rpx;
		bottom: 350rpx;
		width: 130rpx;
		height: 130rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		border-radius: 100%;
		background: linear-gradient(-90deg, #1373fd, #2194ff);
	}
	.baocun {
		width: 92%;
		background-color: rgba(26, 140, 239, 1);
		color: white;
		position: fixed;
		bottom: 0;
		margin-bottom: 20rpx;
		border-radius: 50rpx;
	}
</style>
